<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="8">
        <el-form   label-width="80px" :model="formLabelAlign">
          <el-form-item label="密码">
            <el-input v-model="formLabelAlign.password"></el-input>
          </el-form-item>
          <el-form-item label="操作">
            <el-button class="el-button--success" @click="dosave">保存</el-button>
          </el-form-item>
        </el-form>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import { changepass } from "@/api/admin";
  import { Message } from '_element-ui@2.3.4@element-ui'

  export default {
    data() {
      return {
        list: null,
        listLoading: true,
        formLabelAlign:{
          name:"",
          realname :"",
          cid:0,
          password:""
        },
        classroomlist:[]
      };
    },

    created() {

    },
    methods: {
      dosave() {
        this.listLoading = true;
        changepass(this.formLabelAlign).then((response) => {
          this.$notify({
            title: '成功',
            message: '保存成功！',
            type: 'success'
          });

          this.listLoading = false;
        }).catch(err=>{
          this.$notify({
            title: '失败',
            message: '保存失败！',
            type: 'error'
          });

        })
      },
    },
  };
</script>
